﻿#include "concreteprototype.h"

#include <QDebug>

ConcretePrototype::ConcretePrototype(int id, QString name, QString modelName)
{
    m_model = new WorkModel(modelName);
    m_id = id;
    m_name = name;
}

ConcretePrototype *ConcretePrototype::clone()
{
    ConcretePrototype* proto = new ConcretePrototype(m_id, m_name, m_model->modelName());
    return proto;
}

void ConcretePrototype::show()
{
    qDebug() << "protoType id: " << m_id <<", name: " << m_name << ", model" << m_model->modelName();
}

void ConcretePrototype::setID(int id)
{
    m_id = id;
}

void ConcretePrototype::setName(QString name)
{
    m_name = name;
}

void ConcretePrototype::setModelName(QString modelName)
{
    this->m_model->setModelName(modelName);
}
